package com.thh.media.controller.v1;

import com.thh.media.apis.StatisticsControllerApi;
import com.thh.media.service.StatisticsService;
import com.thh.model.common.dtos.ResponseResult;
import com.thh.model.media.dtos.StatisticDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/statistics")
public class StatisticsController implements StatisticsControllerApi {
	@Autowired
	private StatisticsService statisticsService;

	@Override  
	@RequestMapping("/news")  
	public ResponseResult newsData(@RequestBody StatisticDto dto) {
		return statisticsService.findWmNewsStatistics(dto);  
	}

	@Override
	@RequestMapping("/fans")
	public ResponseResult fansData(@RequestBody StatisticDto dto) {
		return statisticsService.findFansStatistics(dto);
	}
}